package com.itheima.常用API.mathAPI;

public class MathApi {
    public static void main(String[] args) {
        //绝对值
        System.out.println(Math.abs(-200.05));
        //向上取整
        System.out.println(Math.ceil(22.10));
        //向下取整
        System.out.println(Math.floor(22.10));
        //四舍五入
        System.out.println(Math.round(22.22));
        System.out.println(Math.round(22.55));
        //最大值
        System.out.println(Math.max(22, 25));
        //最小值
        System.out.println(Math.min(12, 21));
        //a的b次幂
        System.out.println(Math.pow(2, 5));
        //生成随机数范围是[0.0,1.0)
        System.out.println(Math.random());



    }
}
